// 引入 request 文件
import request from '@/utils/request'

// 发送短信
export const sendmes = (params) => {
    return request({
        url: '/front_end/api/sendmes/',
        method: 'get',
        data: params
    })
}

// 个人中心
export const getUser = (params) => {
    return request({
        url: '/front_end/api/user/',
        method: 'get',
        data: params
    })
}
// 个人中心（修改）
export const edictUser = (params,id) => {
    return request({
        url: '/front_end/api/user/' + id +'/',
        method: 'put',
        data: params
    })
}


// 注册
export const register = (params) => {
    return request({
        url: '/front_end/api/user/',
        method: 'post',
        data: params
    })
}

// 登录
export const login = (params) => {
    return request({
        url: '/front_end/api/login/',
        method: 'post',
        data: params
    })
}

// 下拉选项
export const dropdownxuanxiang= (params) => {
    return request({
        url: '/front_end/api/dropdownxuanxiang/',
        method: 'get',
	    data: params
    })
}

// 根据经纬度获取地址信息
export const getaddress = (params) => {
    return request({
        url: '/front_end/api/address/',
        method: 'get',
        data: params
    })
}

// 上传图片
export const uploadImage = (params) => {
    return request({
        url: '/front_end/api/upload_image/',
        method: 'post',
        data: params
    })
}

// 客户池列表
export const list_kehuchi = (params) => {
    return request({
        url: '/front_end/api/kehu/',
        method: 'get',
        data: params
    })
}
// 客户类别分组
export const list_kehuleibiefenzu = (params) => {
    return request({
        url: '/front_end/api/kehu/leibiefenzu',
        method: 'get',
        data: params
    })
}


// 客户列表
export const list_kehu = (params,id) => {
    return request({
        url: '/front_end/api/kehu/' + id +'/',
        method: 'get',
        data: params
    })
}

// 客户列表（添加） 
export const add_kehu = (params) => {
    return request({
        url: '/front_end/api/kehu/',
        method: 'post',
        data: params
    })
}

// 客户列表（修改） 
export const put_kehu = (params,id) => {
    return request({
        url: '/front_end/api/kehu/' + id +'/',
        method: 'put',
        data: params
    })
}
// export const put_kehu = (params) => {
//     return request({
//         url: '/front_end/api/kehu/',
//         method: 'put',
//         data: params
//     })
// }

// 客户列表（删除）
export const delete_kehu = (id) => {
    return request({
        url: '/front_end/api/kehu/'+id +'/',
        method: 'delete',
    })
}

// 沟通记录
export const list_kehugoutongjilu = (params) => {
    return request({
        url: '/front_end/api/kehugoutongjilu/',
        method: 'get',
        data: params
    })
}
// 沟通记录
export const add_kehugoutongjilu = (params) => {
    return request({
        url: '/front_end/api/kehugoutongjilu/',
        method: 'post',
        data: params
    })
}


// 客户印象(我的界面) 列表
export const list_kehuyinxiangcaidan = (params) => {
    return request({
        url: '/front_end/api/kehuyinxiangcaidan/',
        method: 'get',
        data: params
    })
}

// 客户印象(我的界面)（添加） 
export const add_kehuyinxiangcaidan = (params) => {
    return request({
        url: '/front_end/api/kehuyinxiangcaidan/',
        method: 'post',
        data: params
    })
}

// 客户印象(我的界面)（修改） 
export const put_kehuyinxiangcaidan = (params,id) => {
    return request({
        url: '/front_end/api/kehuyinxiangcaidan/' + id +'/',
        method: 'put',
        data: params
    })
}

// 客户印象(我的界面)（删除）
export const delete_kehuyinxiangcaidan = (id) => {
    return request({
        url: '/front_end/api/kehuyinxiangcaidan/' + id +'/',
        method: 'delete',
    })
}

// 客户印象(我的)子集 列表
export const list_kehuyinxiangxuanxiang = (params) => {
    return request({
        url: '/front_end/api/kehuyinxiangxuanxiang/',
        method: 'get',
        data: params
    })
}

// 客户印象(我的界面)子集（添加） 
export const add_kehuyinxiangxuanxiang = (params) => {
    return request({
        url: '/front_end/api/kehuyinxiangxuanxiang/',
        method: 'post',
        data: params
    })
}

// 客户印象(我的界面)子集（修改） 
export const put_kehuyinxiangxuanxiang = (params,id) => {
    return request({
        url: '/front_end/api/kehuyinxiangxuanxiang/' + id +'/',
        method: 'put',
        data: params
    })
}

// 客户印象(我的界面)子集（删除）
export const delete_kehuyinxiangxuanxiang = (id) => {
    return request({
        url: '/front_end/api/kehuyinxiangxuanxiang/' + id +'/',
        method: 'delete',
    })
}


// 客户列表
export const list_jizhang = (params) => {
    return request({
        url: '/front_end/api/jizhang/',
        method: 'get',
        data: params
    })
}

// 客户列表（添加） 
export const add_jizhang = (params) => {
    return request({
        url: '/front_end/api/jizhang/',
        method: 'post',
        data: params
    })
}

// 记账（修改） 
export const put_jizhang = (params,id) => {
    return request({
        url: '/front_end/api/jizhang/' + id +'/',
        method: 'put',
        data: params
    })
}

// 跟进列表
export const list_genjin = (params) => {
    return request({
        url: '/front_end/api/genjin/',
        method: 'get',
        data: params
    })
}

// 跟进列表（添加） 
export const add_genjin = (params) => {
    return request({
        url: '/front_end/api/genjin/',
        method: 'post',
        data: params
    })
}

// 跟进列表（修改） 
export const put_genjin = (params,id) => {
    return request({
        url: '/front_end/api/genjin/' + id +'/',
        method: 'put',
        data: params
    })
}